<template>
  <view class="page" @tap="close()">
    <scroll-view
      class="scroll"
      :style="{
        height: height == 0 ? 'auto' : height + 'px',
      }"
      scroll-y
      @touchmove.stop.prevent="() => {}"
    >
      <view class="header">
        <view class="title">我的脚型</view>
        <image @tap.stop="close()" src="../../static/image/close.png"></image>
      </view>
      <view class="desc">扫描时间：{{ info.created_at }}</view>
      <view class="foot">
        <view class="item">
          <image src="../../static/image/left_foot.png"></image>
          <text>（您的左脚）</text>
          <text>脚长：{{ info.len_left }}mm </text>
          <text>脚宽：{{ info.width_left }}mm</text>
        </view>
        <view class="item">
          <image src="../../static/image/right_foot.png"></image>
          <text>（您的右脚）</text>
          <text>脚长：{{ info.len_right }}mm </text>
          <text>脚宽：{{ info.width_right }}mm</text>
        </view>
      </view>
      <view class="suggest"> {{ info.recommend }} </view>
    </scroll-view>
  </view>
</template>
<script>
export default {
  props: {
    info: {
      type: Object,
      default: function () {
        return {};
      },
    },
    height: {
      type: Number,
      default: function () {
        return 0;
      },
    },
    animation: {
      type: String,
      default: function () {
        return "";
      },
    },
  },
  data() {
    return {
      isShow: true,
    };
  },
  computed: {},

  methods: {
    close() {
      this.$emit("close", false);
    },
  },
};
</script>
<style lang="less" scoped>
/deep/ .uni-scroll-view {
  overscroll-behavior-y: contain !important;
}
/*弹层动画（从下往上）*/
@keyframes bottomInTop {
  0% {
    -webkit-transform: translate3d(0, 100%, 0);
    -webkit-transform: translate3d(0, 100%, 0);
    transform: translate3d(0, 100%, 0);
    transform: translate3d(0, 100%, 0);
  }
  100% {
    -webkit-transform: none;
    transform: none;
  }
}

@-webkit-keyframes bottomInTop {
  0% {
    -webkit-transform: translate3d(0, 100%, 0);
  }
  100% {
    -webkit-transform: none;
  }
}

/*弹层动画（从上往下）*/
@keyframes topIndown {
  0% {
    -webkit-transform: translate3d(0, -20%, 0);
    -webkit-transform: translate3d(0, -20%, 0);
    transform: translate3d(0, -20%, 0);
    transform: translate3d(0, -20%, 0);
    opacity: 0;
  }
  100% {
    -webkit-transform: none;
    transform: none;
    opacity: 1;
  }
}

@-webkit-keyframes topIndown {
  0% {
    -webkit-transform: translate3d(0, -20%, 0);
    opacity: 0;
  }
  100% {
    -webkit-transform: none;
    opacity: 1;
  }
}

/*弹层动画（从右往左）*/

@keyframes leftInright {
  0% {
    -webkit-transform: translate3d(100%, 0, 0);
    -webkit-transform: translate3d(100%, 0, 0);
    transform: translate3d(100%, 0, 0);
    transform: translate3d(100%, 0, 0);
  }
  100% {
    -webkit-transform: none;
    transform: none;
  }
}
@-webkit-keyframes leftInright {
  0% {
    -webkit-transform: translate3d(100%, 0, 0);
  }
  100% {
    -webkit-transform: none;
  }
}

/*弹层动画（放大）*/
@-webkit-keyframes popIn {
  0% {
    -webkit-transform: scale3d(0, 0, 0);
    transform: scale3d(0.5, 0.5, 0.5);
    opacity: 0;
  }
  50% {
    -webkit-animation-timing-function: cubic-bezier(0.47, 0, 0.745, 0.715);
    animation-timing-function: cubic-bezier(0.47, 0, 0.745, 0.715);
  }
  100% {
    -webkit-transform: scale3d(1, 1, 1);
    transform: scale3d(1, 1, 1);
    -webkit-animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 1;
  }
}

@keyframes popIn {
  0% {
    -webkit-transform: scale3d(0, 0, 0);
    transform: scale3d(0.5, 0.5, 0.5);
    opacity: 0;
  }
  50% {
    -webkit-animation-timing-function: cubic-bezier(0.47, 0, 0.745, 0.715);
    animation-timing-function: cubic-bezier(0.47, 0, 0.745, 0.715);
  }
  100% {
    -webkit-transform: scale3d(1, 1, 1);
    transform: scale3d(1, 1, 1);
    -webkit-animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 1;
  }
}
.page {
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.39);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;

  .scroll {
    background: #fff;
    display: inline-block;
    white-space: nowrap;
    width: 100%;
    position: absolute;
    bottom: 0;
    padding-bottom: 60rpx;
    animation: bottomInTop 0.4s;
    border-radius: 40rpx 40rpx 0px 0px;
    .header {
      padding: 40rpx 26rpx 32rpx 26rpx;
      display: flex;
      justify-content: space-between;
      border-bottom: 1px solid #eee;
      .title {
        flex: 1;
        font-size: 32rpx;
        color: #000000;
        font-weight: bold;
      }
      image {
        width: 46rpx;
        height: 46rpx;
      }
    }
    .desc {
      width: 100%;
      // display: inline-block;
      text-align: center;
      color: #999999;
      font-size: 26rpx;
      margin-top: 36rpx;
    }
    .foot {
      display: flex;
      justify-content: space-between;
      padding: 0 92rpx;
      .item {
        display: flex;
        flex-direction: column;

        image {
          width: 212rpx;
          height: 348rpx;
          margin-top: 36rpx;
        }
        text {
          text-align: center;
          &:nth-child(2) {
            height: 40rpx;
            line-height: 40rpx;
            font-size: 28rpx;
            font-weight: bold;
            margin-top: 20rpx;
          }
          &:nth-child(3),
          &:nth-child(4) {
            height: 50rpx;
            font-size: 32rpx;
            line-height: 50rpx;
          }
        }
      }
    }
    .suggest {
      height: 80rpx;
      line-height: 80rpx;
      background: rgba(249, 249, 249);
      text-align: center;
      margin-top: 38rpx;
      color: #cd3e42;
      font-size: 28rpx;
      &::after {
        content: "码";
        color: #666666;
      }
      &::before {
        content: "根据您的脚型数据为您推荐";
        color: #666666;
      }
    }
  }
}
</style>
